﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MaintainSale.aspx.cs" Inherits="SaleManagement" %>
<%@ Register Src="~/Share/Insert_UpdateSales.ascx" TagName="UpdateSale" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        <%--<asp:DataList ID="dtlPostingSold" runat="server">
            <ItemTemplate>
            <img id="imgPosting" alt="" src="<%# Eval("Url") %>"/><br />
                <h1>Posting Name: </h1><span><%# Eval("PostingName") %> </span><br />
                <h1>Description: </h1><span><%# Eval("Description") %></span><br />
                <h1>Quotations: </h1><span><%# Eval("Quotations") %></span><br />
                <h1>Price: </h1><span><%# Eval("Price") %></span><br />
                <h1>Sell Date: </h1><span><%# Eval("SellDate", "{0:MMMM d, yyyy}") %></span><br />
                <h1>CustomerID: </h1><span><%# Eval("CustomerID") %></span><br />
                <h1>Customer Name: </h1><span><%# Eval("Fullname") %></span><br />               
                Status: <%#IsPayed(Eval("Paid")) %>
            </ItemTemplate>
        </asp:DataList>--%>
           <div class="cleaner_with_height"></div>
        <asp:Panel ID="pnlSales" runat="server">
        </asp:Panel>

        <div class="cleaner"></div>       
        <asp:Button ID="btn_Delete" runat="server" Text="Delete" 
            onclick="btn_Delete_Click1" />
       <asp:GridView ID="grd_PostingSold" runat="server" AllowPaging="true" EmptyDataText="Don't Have Any Sales" Width="660px" PageSize="10" AutoGenerateColumns="false" DataKeyNames="SalesID">

            <Columns>
                <asp:TemplateField ItemStyle-Width="10px">
                 <ItemStyle HorizontalAlign="Center" />
                    <HeaderTemplate>All<asp:CheckBox ID="chk_All" runat="server" AutoPostBack="true" OnCheckedChanged="onCheckedChange" /> </HeaderTemplate>
                    <ItemTemplate><asp:CheckBox ID="chk_Item" runat="server" /></ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                 <ItemStyle HorizontalAlign="Center" />
                    <HeaderTemplate>Posting Name</HeaderTemplate>
                    <ItemTemplate><%# Eval("PostingName") %></ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField>
                 <ItemStyle HorizontalAlign="Center" />
                    <HeaderTemplate>Price</HeaderTemplate>
                    <ItemTemplate><%# Eval("Price") %></ItemTemplate>
                </asp:TemplateField>

                <%--<asp:TemplateField>
                    <HeaderTemplate>Status</HeaderTemplate>
                    <ItemTemplate><%# Eval("Status") %></ItemTemplate>
                </asp:TemplateField>--%>

                <asp:TemplateField>
                 <ItemStyle HorizontalAlign="Center" />
                    <HeaderTemplate>Sell Date</HeaderTemplate>
                    <ItemTemplate><%# Eval("SellDate", "{0:dd/MM/yyyy}")%></ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField>
                 <ItemStyle HorizontalAlign="Center" />
                    <HeaderTemplate>Customer Name</HeaderTemplate>
                    <ItemTemplate><%# Eval("FullName")%></ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField>
                 <ItemStyle HorizontalAlign="Center" />
                    <HeaderTemplate>Paid</HeaderTemplate>
                    <ItemTemplate><%# IsPayed(Eval("Paid").ToString())%></ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField>
                 <ItemStyle HorizontalAlign="Center" />
                  <HeaderTemplate>Details</HeaderTemplate>
                  <ItemTemplate>
                       <a href='MaintainSale.aspx?SalesID=<%# Eval("SalesID") %>'>Detail</a>
                  </ItemTemplate>
        </asp:TemplateField>
            </Columns>
       </asp:GridView>
    </div>
</asp:Content>

